package com.vf.admin.miaodong.service.impl;

import com.vf.admin.common.splitpage.SplitPageBean;
import com.vf.admin.miaodong.dao.AfterDynamicDao;
import com.vf.admin.miaodong.entity.AppDynamic;
import com.vf.admin.miaodong.service.AfterDynamicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
/**
 * 动态
 */
@Service
public class AfterDynamicServiceImpl implements AfterDynamicService {

    @Autowired
    AfterDynamicDao afterDynamicDao;

    /**
     * 添加/修改
     */
    @Override
    public void saveOrUpdate(AppDynamic appDynamic) {
        afterDynamicDao.saveOrUpdate(appDynamic);
    }

    /**
     * 详情
     */
    @Override
    public AppDynamic getByid(Integer id) {
        return afterDynamicDao.get(id);
    }

    /**
     * 查询列表
     */
    @Override
    public List<AppDynamic> findList(Map<String, Object> paramap, SplitPageBean splitPageBean) {
        return afterDynamicDao.findList(paramap, splitPageBean);
    }

    /**
     * 更新状态(逻辑删除)
     */
    @Override
    public void updateStatus(Integer id, Integer status) {
        afterDynamicDao.updateStatus(id, status);
    }

    /**
     * 删除
     */
    public void del(Integer id){
        afterDynamicDao.del(id);
    }
}
